﻿using Microsoft.Practices.EnterpriseLibrary.Data;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Iftrue.Library.Test.Controllers
{
    public class DataController : Controller
    {
        //
        // GET: /Data/

        public ActionResult DataAccess()
        {
            DatabaseProviderFactory dbFactory = new DatabaseProviderFactory();
            Database db = dbFactory.Create("ExampleDatabase");
            DataSet ds = db.ExecuteDataSet(CommandType.Text, "select top 10 * from data_commodity");

           // ViewData["ds"] = ds;
            return View(ds);
        }

    }
}
